package com.xxgc.eow.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Getter;
import lombok.Setter;

/**
 * <p>
 * 笔记
 * </p>
 *
 * @author Mr.Abel
 * @since 2023-05-23
 */
@Getter
@Setter
@Schema(name = "Note", description = "笔记")
public class Note implements Serializable {

    private static final long serialVersionUID = 1L;

    @Schema(description = "笔记id")
    @TableId(value = "note_id", type = IdType.AUTO)
    private Integer noteId;

    @Schema(description = "用户id")
    private Integer userId;

    @Schema(description = "题目id")
    private Integer topicId;

    @Schema(description = "笔记内容")
    private String nodeContent;

    @Schema(description = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @Schema(description = "销毁时间")
    private LocalDateTime destoryTime;

    @Schema(description = "假删除状态")
    private Byte tip;

    @Override
    public String toString() {
        return "Note{" +
                "noteId=" + noteId +
                ", userId=" + userId +
                ", topicId=" + topicId +
                ", nodeContent='" + nodeContent + '\'' +
                ", createTime=" + createTime +
                ", destoryTime=" + destoryTime +
                ", tip=" + tip +
                '}';
    }

    public Note() {
    }

    public Note(Integer noteId, Integer userId, Integer topicId, String nodeContent, LocalDateTime createTime, LocalDateTime destoryTime, Byte tip) {
        this.noteId = noteId;
        this.userId = userId;
        this.topicId = topicId;
        this.nodeContent = nodeContent;
        this.createTime = createTime;
        this.destoryTime = destoryTime;
        this.tip = tip;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    public Integer getNoteId() {
        return noteId;
    }

    public void setNoteId(Integer noteId) {
        this.noteId = noteId;
    }

    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    public Integer getTopicId() {
        return topicId;
    }

    public void setTopicId(Integer topicId) {
        this.topicId = topicId;
    }

    public String getNodeContent() {
        return nodeContent;
    }

    public void setNodeContent(String nodeContent) {
        this.nodeContent = nodeContent;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    public LocalDateTime getDestoryTime() {
        return destoryTime;
    }

    public void setDestoryTime(LocalDateTime destoryTime) {
        this.destoryTime = destoryTime;
    }

    public Byte getTip() {
        return tip;
    }

    public void setTip(Byte tip) {
        this.tip = tip;
    }
}
